home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1996 October: Mac OS SDK / Dev.CD Oct 96 SDK / Dev.CD Oct 96 SDK2.toast / Development Kits (Disc 2) / OpenDoc / OpenDoc Development / Debugging Support / OpenDoc Source Code / Imaging / ImagingInit.cpp < prev    next >
Encoding:
C/C++ Source or Header  |  1996-04-22  |  1.4 KB  |  63 lines  |  [TEXT/MPS ]

  1. /*
  2.     File:        ImagingInit.cp
  3.  
  4.     Contains:    Init routines for the Imaging library
  5.  
  6.     Owned by:    Jens Alfke
  7.  
  8.     Copyright:    © 1994 - 1995 by Apple Computer, Inc., all rights reserved.
  9.  
  10.     Change History (most recent first):
  11.  
  12.          <7>     8/11/95    jpa        Added ImagingInit for single-lib build
  13.                                     [1276412]
  14.          <6>     5/25/95    jpa        Don't need to include GX headers anymore.
  15.                                     [1241078, 1253324]
  16.          <5>     1/12/95    jpa        Don't use obsolete Toolbox names [1211211].
  17.          <4>     12/5/94    jpa        Moved initialization of gGX here from
  18.                                     Shape.cpp. Check if CFM has connected to GX
  19.                                     as well as checking Gestalt. [1203923]
  20.          <3>     9/29/94    RA        1189812: Mods for 68K build.
  21.          <2>     8/19/94    NP        1181622: Ownership fix.
  22.          <1>     6/30/94    jpa        first checked in
  23.  
  24.     To Do:
  25.     In Progress:
  26.         
  27. */
  28.  
  29. #ifndef __USERSRCM__
  30. #include "UseRsrcM.h"
  31. #endif
  32.  
  33. #ifndef _REALSHPE_
  34. #include "RealShpe.h"                    /* For gGX */
  35. #endif
  36.  
  37. #ifndef __GESTALT__
  38. #include <Gestalt.h>
  39. #endif
  40.  
  41. #ifndef __GXGRAPHICS__
  42. #include <GXGraphics.h>
  43. #endif
  44.  
  45.  
  46. OSErr ImagingInit( );
  47. extern "C" pascal OSErr ImagingCFMInit( CFragInitBlockPtr );
  48.  
  49.  
  50. OSErr ImagingInit( )
  51. {
  52.     long result;                            // Is QuickDraw GX installed?
  53.     gGX = (Gestalt(gestaltGraphicsVersion,&result) == noErr)
  54.             && (void*)GXNewShape != (void*)kUnresolvedCFragSymbolAddress;
  55.     return noErr;
  56. }
  57.  
  58. pascal OSErr ImagingCFMInit (CFragInitBlockPtr initBlkPtr)
  59. {
  60.     (void) ImagingInit();
  61.     return InitLibraryResources(initBlkPtr);
  62. }
  63.